package com.haima.ziliao.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haima.ziliao.mapper.PChanpinMapper;
import com.haima.ziliao.domain.PChanpin;
import com.haima.ziliao.service.IPChanpinService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 研学产品Service业务层处理
 * 
 * @author hima
 * @date 2024-12-21
 */
@Service
public class PChanpinServiceImpl extends ServiceImpl<PChanpinMapper, PChanpin> implements IPChanpinService
{
    @Autowired
    private PChanpinMapper pChanpinMapper;

    /**
     * 查询研学产品
     * 
     * @param id 研学产品主键
     * @return 研学产品
     */
    @Override
    public PChanpin selectPChanpinById(Long id)
    {
        return pChanpinMapper.selectPChanpinById(id);
    }

    /**
     * 查询研学产品列表
     * 
     * @param pChanpin 研学产品
     * @return 研学产品
     */
    @Override
    public List<PChanpin> selectPChanpinList(PChanpin pChanpin)
    {
        return pChanpinMapper.selectPChanpinList(pChanpin);
    }

    /**
     * 新增研学产品
     * 
     * @param pChanpin 研学产品
     * @return 结果
     */
    @Override
    public int insertPChanpin(PChanpin pChanpin)
    {
        return pChanpinMapper.insertPChanpin(pChanpin);
    }

    /**
     * 修改研学产品
     * 
     * @param pChanpin 研学产品
     * @return 结果
     */
    @Override
    public int updatePChanpin(PChanpin pChanpin)
    {
        return pChanpinMapper.updatePChanpin(pChanpin);
    }

    /**
     * 批量删除研学产品
     * 
     * @param ids 需要删除的研学产品主键
     * @return 结果
     */
    @Override
    public int deletePChanpinByIds(Long[] ids)
    {
        return pChanpinMapper.deletePChanpinByIds(ids);
    }

    /**
     * 删除研学产品信息
     * 
     * @param id 研学产品主键
     * @return 结果
     */
    @Override
    public int deletePChanpinById(Long id)
    {
        return pChanpinMapper.deletePChanpinById(id);
    }
}
